import {
  _decorator,
  Component,
  Node,
  resources,
  director,
  Button,
  Prefab,
  BaseNode,
  instantiate,
} from "cc";
import GameCtrl from "../model/GameCtrl";
import { GameView } from "../view/gameView/GameView";

const { ccclass, property } = _decorator;

@ccclass("GameScene")
export class GameScene extends Component {
  @property(Prefab)
  private gameViewPrefab: Prefab = null;
  start() {
    let gameView: GameView = instantiate(this.gameViewPrefab).getComponent(
      GameView
    );
    this.node.addChild(gameView.node);
    // this.gameCtrl.init();
    // this.gameCtrl.onPlay();
    GameCtrl.ins.newGame();
  }
  onDestroy(): void {}
}
